package com.jj.controller;

import com.jj.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.Future;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("getInfo")
    public String getInfo(){
        return userService.getInfo("zhangsan",28);
    }

    @GetMapping("getInfoById")
    public Future<String> getInfoById(){
        return userService.getInfoById(1);
    }
}
